﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xaml;
using System.CodeDom;

namespace NeuroSpeech.XamlExtensions
{
    public class BasePathWriter : XamlDirectiveWriter
    {
        public BasePathWriter():base(XamlLanguage.Base)
        {

        }


        #region public override void  WriteEndMember(XamlCodeContext context)
        public override void EndMember(XamlCodeContext context)
        {
            CodeMemberField fileName = new CodeMemberField(typeof(string), "FileName");
            fileName.Attributes = MemberAttributes.Public | MemberAttributes.Static;
            fileName.InitExpression = new CodePrimitiveExpression(context.Peek.Value.Value as string);
            context.Type.Members.Add(fileName);
        }
        #endregion


    }
}
